How to remove newline or space character from a list in Python

welcome to shbcf.ru